package com.max.file;

import java.io.IOException;
import java.io.RandomAccessFile;

/**
 * Created by myu1 on 9/4/17.
 */
public class FileAccessor {

    public static RandomAccessFile createFile(FileMetadata fileMetadata) throws IOException {
        RandomAccessFile file = new RandomAccessFile(fileMetadata.getFileName(), "rwd");

        file.setLength(fileMetadata.getFileSize());

        return file;
    }
}
